package cn.rongdao.jrkabao.model.cashcoupon;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.bean.cashcoupon.GetCouponOkNumberBean;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/11/3
 */

public class GetCouponOkNumberModel extends BaseKaMaoModel {

    public static GetCouponOkNumberModel getInstance() {
        return getPresent(GetCouponOkNumberModel.class);
    }

    public void execute(String passWayId, String transAmount, Observer<GetCouponOkNumberBean> observer) {
        addParamStrings("id", FRString.valueOf(passWayId));
        addParamStrings("trans_amount", FRString.valueOf(transAmount));
        Observable<GetCouponOkNumberBean> observable = mServletApi.getCouponOkNumber(mParams).map(new HttpFunction<GetCouponOkNumberBean>());
        toSubscribe(observable, observer);
    }

}